#import time
#import dailyspents.util as util
#import os
#from os.path import join
<html>

#include join(util.HTMLPATH, 'common', 'head.html')

<body>
	<div id="site">
		#include join(util.HTMLPATH, 'common', 'top.html')
		#include join(util.HTMLPATH, 'common', 'menu.html')
		<div id="content">
		  <!-------------------- LEFT SIDE ------------------------->
		  <div id="left">
		    <div class="tl"><div class="tr">
			    filter
			</div></div>
			
			#include join(util.HTMLPATH, 'common', 'errorMessages.html')
			
			#import cherrypy

			<div class="newSpentForm">
					<form action="/spent/filter" name="filterForm">
					<table>
					<tr>
					 <td>
					  <label for="from">from</label>
					 </td>
					 <td>
					  <INPUT TYPE="text" NAME="from" VALUE="" SIZE=8 readonly="readonly">
					  <a href="javascript:cal2.popup();"><img src="/static/images/x-office-calendar.png" 
						width="16" height="16" border="0" alt="Click Here to Pick up the date"></a>
					  <br>
					 </td>
					</tr>
					<tr>
					 <td>
					<label for="to">to</label>
					</td>
					 <td>
					  <INPUT TYPE="text" NAME="to" VALUE="" SIZE=8 readonly="readonly">
					  <a href="javascript:cal3.popup();"><img src="/static/images/x-office-calendar.png" 
						width="16" height="16" border="0" alt="Click Here to Pick up the date"></a>
					  <br>
					 </td>
					</tr>
					<tr>
					 <td>
					  <label for="categoryF">category</label>
					 </td>
					 <td>
					<select name="categoryId">
						<option value="">Select...</option>
						#for cat in $cherrypy.session['user'].categories:
							<option value="$cat.id">$cat.name</option>
						#end for
					</select>
					</td>
					</tr>
                                        <tr>
                                            <td><label for"localId">local</label></td>
                                            <td>
                                                <select name="localId">
                                                    <option value="" selected="selected">Select...
                                                    #for local in $cherrypy.session['user'].locals:
                                                            <option value="$local.id"> $local.name                                                        
                                                    #end for
                                                </select>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><label for="paymentId">payment mode</label></td>
                                            <td>
                                            <select value="" name="paymentId">
                                                    <option value="">Select...</option>
                                                    #for payment in $cherrypy.session['user'].payments:
                                                            <option value="$payment.id">$payment.name</option>
                                                    #end for
                                            </select>
                                            </td>
                                            </tr>
					<tr>
					<td>
					<label for="value">value</label>
					</td>
					<td>
					<input type="text" name="value" size="5"/>
					</td>
					</tr>
					<tr>
					<td>
					  show only statistics
					</td>
					<td>
					  <input name="showStatistics" type="checkbox" value="1" style="height:12px;"/>
					</td>
					</tr>
					</table>
					<hr/>
					<table>
					<tr>
					<td><input type="submit" value="Filter"/></td>
					<td>
					</td>
					</tr>
					</table>
					</form>
					<script>
						var cal2 = new calendar3(document.forms['filterForm'].elements['from']);
						var cal3 = new calendar3(document.forms['filterForm'].elements['to']);
					</script>
			</div>
		  </div>
		  <!-- END OF LEFTSIDE -->
		  <!-- RIGHTSIDE -->
		  <div id="right">
				
			  	#include join(util.HTMLPATH, 'common', 'categories.html')
				#include join(util.HTMLPATH, 'common', 'locals.html')
				#include join(util.HTMLPATH, 'common', 'payments.html')
				
		  </div>
		</div>
		#include join(util.HTMLPATH, 'common', 'bottom.html')
	</div>
</body>

</html>
